Tk_GenericProc *_p_r_o_c (in) Procedure to invoke whenever any
X event occurs on any display.
ClientData _c_l_i_e_n_t_D_a_t_a (in) Arbitrary one-word value to pass
to _p_r_o_c.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
TTTTkkkk____CCCCrrrreeeeaaaatttteeeeGGGGeeeennnneeeerrrriiiiccccHHHHaaaannnnddddlllleeeerrrr arranges for _p_r_o_c to be invoked in the future
whenever any X event occurs. This mechanism is _n_o_t intended for
dispatching X events on windows managed by Tk (you should use
TTTTkkkk____CCCCrrrreeeeaaaatttteeeeEEEEvvvveeeennnnttttHHHHaaaannnnddddlllleeeerrrr for this purpose). TTTTkkkk____CCCCrrrreeeeaaaatttteeeeGGGGeeeennnneeeerrrriiiiccccHHHHaaaannnnddddlllleeeerrrr is
intended for other purposes, such as tracing X events, monitoring events
on windows not owned by Tk, accessing X-related libraries that were not
originally designed for use with Tk, and so on.
The callback to _p_r_o_c will be made by TTTTkkkk____HHHHaaaannnnddddlllleeeeEEEEvvvveeeennnntttt; this mechanism only
works in programs that dispatch events through TTTTkkkk____HHHHaaaannnnddddlllleeeeEEEEvvvveeeennnntttt (or through
other Tk procedures that call TTTTkkkk____HHHHaaaannnnddddlllleeeeEEEEvvvveeeennnntttt, such as TTTTkkkk____DDDDooooOOOOnnnneeeeEEEEvvvveeeennnntttt or
TTTTkkkk____MMMMaaaaiiiinnnnLLLLoooooooopppp).
_P_r_o_c should have arguments and result that match the type TTTTkkkk____GGGGeeeennnneeeerrrriiiiccccPPPPrrrroooocccc:
typedef int Tk_GenericProc(
ClientData _c_l_i_e_n_t_D_a_t_a,
XEvent *_e_v_e_n_t_P_t_r);
The _c_l_i_e_n_t_D_a_t_a parameter to _p_r_o_c is a copy of the _c_l_i_e_n_t_D_a_t_a argument
given to TTTTkkkk____CCCCrrrreeeeaaaatttteeeeGGGGeeeennnneeeerrrriiiiccccHHHHaaaannnnddddlllleeeerrrr when the callback was created.
Typically, _c_l_i_e_n_t_D_a_t_a points to a data structure containing application-
specific information about how to handle events. _E_v_e_n_t_P_t_r is a pointer
to the X event.
Whenever an X event is processed by TTTTkkkk____HHHHaaaannnnddddlllleeeeEEEEvvvveeeennnntttt, _p_r_o_c is called. The
return value from _p_r_o_c is normally 0. A non-zero return value indicates
that the event is not to be handled further; that is, _p_r_o_c has done all
processing that is to be allowed for the event.
If there are multiple generic event handlers, each one is called for each
event, in the order in which they were established.